﻿#region Copyright

// Majesty of Omega - The next evolution of macro management space strategy
// 
// Copyright 2007-2009 André Claaßen
// 
// This file is protected by the terms and conditions of the
// Microsoft Community License (Ms-CL 1.1), a copy of which should
// have been distributed along with this software. If not,
// you may find the license information at the following URL:
// 
// http://www.microsoft.com/resources/sharedsource/licensingbasics/communitylicense.mspx

#endregion

using System;

namespace Majesty_of_Omega.Logic.Calculate
{
    /// <summary>
    /// Calculates the value of the several resources
    /// Mineral, money, research
    /// </summary>
    public class ResourceCalculator : GameCalculator
    {
        #region GameCalculator Members

        /// <summary>
        /// Calculates the next turn for the given player
        /// </summary>
        /// <remarks>
        /// In the current state of the game, this is a dummy calculator which generates research points
        /// in dependence of the game turn.
        /// </remarks>
        /// <param name="calculateInfo"></param>
        protected override void OnCalculate(CalculateInfo calculateInfo)
        {
            calculateInfo.Player.ResearchManager.TotalResearchPointsOfCurrentTurn +=
                    (int)(Math.Pow(1.03, calculateInfo.ReportTurn.TurnNumber) * 50);
        }

        #endregion
    }
}